﻿using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.Text;

namespace AppSocketModel
{
    /// <summary>
    /// 车辆信息
    /// </summary>
    [BsonIgnoreExtraElements]
    public class VehicleDto
    {
        /// <summary>
        /// 企业Id
        /// </summary>
        public int CompanyId { set; get; }

        /// <summary>
        /// 账户Id
        /// </summary>
        public string AccountId { set; get; }
         
        /// <summary>
        /// 车牌号
        /// </summary>
        public string VehicleNo { set; get; }

        /// <summary>
        /// GPS-IMEI
        /// </summary>
        public string IMEI { set; get; }

        /// <summary>
        /// 车辆类型
        /// </summary> 
        public VehicleType vehicleType { set; get; }

        /// <summary>
        /// 车辆类型
        /// </summary> 
        public string vehicleTypeStr
        {
            get
            {
                return vehicleType.GetDescriptionString();
            }
        }

    /// <summary>
    /// 车型长度
    /// </summary>
    public float VehicheTypeCode { set; get; }

        /// <summary>
        /// 司机电话
        /// </summary>
        public string DriverPhone { set; get; }

        /// <summary>
        ///司机名称 
        /// </summary>
        public string DriverName { set; get; }

        /// <summary>
        /// 司机信息
        /// </summary>
        public DriverDto Driver { set; get; }


        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { set; get; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime ModifyTime { set; get; }

        /// <summary>
        /// 排序编号
        /// </summary>
        public int SortNo { set; get; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { set; get; }

        /// <summary>
        /// 浅表赋值
        /// </summary>
        /// <returns></returns>
        public VehicleDto Clone()
        {
            var v = new VehicleDto();
            v.CompanyId = CompanyId;
            v.AccountId = AccountId;
            v.VehicleNo = VehicleNo;
            v.IMEI = IMEI;
            return v;
        }
        
    }
}
